 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace IDE_week2_Forms_project
{
 //probaa
 //test
// dimitar 
//test4
//test2
//dsaas
    public partial class Form1 : Form
    {
        public string language = "en";
        private void ChangeLanguage(string lang)
        {

            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }

        public Form1()
        {
            InitializeComponent();
        }

        private void opennewformbutton_Click(object sender, EventArgs e)
        {
            Form2 form = new Form2();
            form.Visible = true;
        }

        private void changeiconbutton_Click(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.ICON1;
        }

        private void reseticonbutton_Click(object sender, EventArgs e)
        {
            this.Icon = null;
        }

        private void changelanguagebutton_Click(object sender, EventArgs e)
        {
            if (language == "en")
            {
                
                this.ChangeLanguage("nl");
                language = "nl";
            }
            else
            {
                this.ChangeLanguage("en");
                language = "en";
            }
        }

        private void callclass1button_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];
        }
    }
}
